﻿using Microsoft.AspNetCore.Mvc;

namespace AuthServer.Controllers
{
    [ApiController]
    [Route("[controller]/[action]")]
    public class AuthController : ControllerBase
    {
        /// <summary>
        /// 请求第三方服务器，这里属于替代，因为不需要第三方
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult Index([FromQuery] string code, [FromQuery] string iss, [FromQuery] string state)
        {
            // 这里可以是一个授权的页面提示用户同意或者取消
            return new JsonResult(new { code = code, iss = iss , state  = state });
        }
    }
}
